package middle.ground.config;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 项目配置信息的工具类
 *
 * @author jrl
 * @since 2020-12-01
 */
@Getter
@Component("config")
public class Config {

	@Value("${spring.datasource.url:}")
	private String dbUrl;

	@Value("${spring.datasource.username:}")
	private String dbUsername;

	@Value("${spring.datasource.password:}")
	private String dbPassword;

	@Value("${spring.datasource.dbIp:}")
	private String dbIp;

	@Value("${spring.datasource.dbPort:}")
	private String dbPort;

	@Value("${spring.datasource.dbName:}")
	private String dbName;

	@Value("${di.alive.url:}")
	private String diAliveUrl;
	@Value("${di.dws.url:}")
	private String diDwsUrl;
	@Value("${di.realTimeSync.url:}")
	private String diRealTimeSyncUrl;
	@Value("${di.realApprove.url:}")
	private String diRealApproveUrl;
	@Value("${di.metadataRealTimeSync.url:}")
	private String diMetadataSyncRealTimeUrl;

	@Value("${metamodel.schema.id:}")
	private Integer metamodelSchemaId;
	@Value("${metamodel.table.id:}")
	private Integer metamodelTableId;
	@Value("${metamodel.column.id:}")
	private Integer metamodelColumnId;
	@Value("${tidb.manager.url:}")
	private String tidbManageUrl;

	/**
	 * 数仓名字
	 */
	public static final String DATA_HOUSE_DB_NAME = "middle_db";
	public static final String METADATA_VERSION = "V1";
}
